import requests
def query(itemcode):
    cookies = {
        'JSESSIONID': '7E0D153E6CECD22C256D6AA93ECD2152',
        'tempTokenKey': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLnhormr4UiLCJhdWQiOiI5RTEwNTlDOTMzNUQ0QzdDQjhEQzc0MDBEMDNBRUNGQiIsInNlcnZlciI6bnVsbCwicm9sZSI6IlJPTEVfQVJFQSxST0xFX1dJTkRPVyIsImlzSW5pdGlhbFBhc3N3b3JkIjoiMCIsInJlZ2lvbk5hbWUiOiLotLXlt57nnIEiLCJpbmR1c3RyeSI6bnVsbCwiYXBwQ29kZSI6ImRnb3YtcG9ydGFsIiwib3JnYW5OYW1lIjoi5paw6L-b5Lq65ZGYIiwicmVnaW9uQ29kZSI6IjUyMDAwMCIsImluZHVzdHJ5TGlzdCI6bnVsbCwib3JnYW5Db2RlIjoiNTIwMDAwMjAxNzAyMTYxMDA1MzAwMDA1MDciLCJleHBpcmF0aW9uVGltZSI6MiwiZ3JhZGUiOiIyIiwic3RhdHVzIjoiMSIsImlzcyI6Imluc3B1ciIsImlhdCI6MTczMjIzOTUzMCwiZXhwIjoxNzMyMjY4MzMwfQ.Dko517A_U61YWW_YkifM-sqaqfDb9U_hRS2-uekL5IQ7PqmqXUCS10MbDodoIrYN6f4vXdJe4-rtm4qrO8Xk7g',
        'userInfoKey': '{^%^22role^%^22:^%^22ROLE_AREA^%^2CROLE_WINDOW^%^22^%^2C^%^22isInitialPassword^%^22:^%^220^%^22^%^2C^%^22regionName^%^22:^%^22^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^E7^%^9C^%^81^%^22^%^2C^%^22appCode^%^22:^%^22dgov-portal^%^22^%^2C^%^22organName^%^22:^%^22^%^E6^%^96^%^B0^%^E8^%^BF^%^9B^%^E4^%^BA^%^BA^%^E5^%^91^%^98^%^22^%^2C^%^22regionCode^%^22:^%^22520000^%^22^%^2C^%^22phone^%^22:^%^22384d53fa06a4844cfd54260b048c33e9^%^22^%^2C^%^22organCode^%^22:^%^2252000020170216100530000507^%^22^%^2C^%^22expirationTime^%^22:2^%^2C^%^22name^%^22:^%^221342b48e6f8f39ea7ba36accc05b61a8^%^22^%^2C^%^22id^%^22:^%^229E1059C9335D4C7CB8DC7400D03AECFB^%^22^%^2C^%^22email^%^22:^%^22aa67c9bf293c42e9144476195b550c0f^%^22^%^2C^%^22username^%^22:^%^2247d57692a252657367001b6a2ff35333^%^22^%^2C^%^22status^%^22:^%^221^%^22^%^2C^%^22isWeakPwd^%^22:^%^220^%^22}',
        'pwdState': 'true',
        'inspurRoleKey': 'ROLE_AREA',
        'windowId': '0B7CA12E92004E0ABCA9EB88F0A792E4',
        'James_cookie_sYQDUGqqzHtheme': 'custom',
        'lcToken': 'undefined',
        'webfinal.session.errorCount': '0',
        'tempTokenKey-slsp': 'eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLnhormr4UiLCJhdWQiOiI5RTEwNTlDOTMzNUQ0QzdDQjhEQzc0MDBEMDNBRUNGQiIsInNlcnZlciI6bnVsbCwicm9sZSI6IkNKWVlfU1lTVEVNLENKWVlfQlVTSU5FU1MiLCJpc0luaXRpYWxQYXNzd29yZCI6IjAiLCJyZWdpb25OYW1lIjoi6LS15bee55yBIiwiaW5kdXN0cnkiOm51bGwsImFwcENvZGUiOiJER09WLVpXRlctU0xTUCIsIm9yZ2FuTmFtZSI6IuaWsOi_m-S6uuWRmCIsInJlZ2lvbkNvZGUiOiI1MjAwMDAiLCJpbmR1c3RyeUxpc3QiOm51bGwsIm9yZ2FuQ29kZSI6IjUyMDAwMDIwMTcwMjE2MTAwNTMwMDAwNTA3IiwiZXhwaXJhdGlvblRpbWUiOjIsImdyYWRlIjoiMiIsInN0YXR1cyI6IjEiLCJpc3MiOiJpbnNwdXIiLCJpYXQiOjE3MzIyNjA4NjUsImV4cCI6MTczMjI4OTY2NX0.HAeikwVlQje-V4uWtBPqJYjryGS4mxORUjzoLy07gkabcMzOUHPHctKIAb7Jq62YGGgwXUkargYDEpTYZjKMIQ',
        'userInfoKey-slsp': '{^%^22role^%^22:^%^22CJYY_SYSTEM^%^2CCJYY_BUSINESS^%^22^%^2C^%^22isInitialPassword^%^22:^%^220^%^22^%^2C^%^22regionName^%^22:^%^22^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^E7^%^9C^%^81^%^22^%^2C^%^22appCode^%^22:^%^22DGOV-ZWFW-SLSP^%^22^%^2C^%^22organName^%^22:^%^22^%^E6^%^96^%^B0^%^E8^%^BF^%^9B^%^E4^%^BA^%^BA^%^E5^%^91^%^98^%^22^%^2C^%^22regionCode^%^22:^%^22520000^%^22^%^2C^%^22phone^%^22:^%^2218198171062^%^22^%^2C^%^22organCode^%^22:^%^2252000020170216100530000507^%^22^%^2C^%^22expirationTime^%^22:2^%^2C^%^22name^%^22:^%^22^%^E7^%^86^%^8A^%^E6^%^AF^%^85^%^22^%^2C^%^22id^%^22:^%^229E1059C9335D4C7CB8DC7400D03AECFB^%^22^%^2C^%^22email^%^22:^%^22afasfe^@qq.com^%^22^%^2C^%^22username^%^22:^%^22gys_xy^%^22^%^2C^%^22status^%^22:^%^221^%^22^%^2C^%^22windowId^%^22:^%^2211EF7D785488E5FCBAD4AF91FADA434E^%^22^%^2C^%^22windowName^%^22:^%^22^%^E9^%^81^%^B5^%^E4^%^B9^%^89^%^E5^%^B8^%^82^%^E4^%^B8^%^80^%^E4^%^BB^%^B6^%^E4^%^BA^%^8B^%^E7^%^AA^%^97^%^E5^%^8F^%^A3^%^22^%^2C^%^22windowCode^%^22:^%^22^%^E9^%^81^%^B5^%^E4^%^B9^%^89^%^E5^%^B8^%^82^%^E4^%^B8^%^80^%^E4^%^BB^%^B6^%^E4^%^BA^%^8B^%^E7^%^AA^%^97^%^E5^%^8F^%^A3^%^22^%^2C^%^22hallName^%^22:^%^22^%^E9^%^81^%^B5^%^E4^%^B9^%^89^%^E5^%^B8^%^82^%^E6^%^94^%^BF^%^E5^%^8A^%^A1^%^E6^%^9C^%^8D^%^E5^%^8A^%^A1^%^E4^%^B8^%^AD^%^E5^%^BF^%^83^%^22^%^2C^%^22hallCode^%^22:^%^2200001^%^22^%^2C^%^22windowRegionCode^%^22:^%^22520300^%^22}',
    }

    headers = {
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0',
        'Accept': 'application/json, text/javascript, */*; q=0.01',
        'Accept-Language': 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2',
        # 'Accept-Encoding': 'gzip, deflate',
        'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8',
        'X-Requested-With': 'XMLHttpRequest',
        'Origin': 'http://59.215.206.188',
        'Connection': 'keep-alive',
        'Referer': 'http://59.215.206.188/sxgl/mng/project/change/info/index?v=1732265757948',
        # 'Cookie': 'JSESSIONID=7E0D153E6CECD22C256D6AA93ECD2152; tempTokenKey=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLnhormr4UiLCJhdWQiOiI5RTEwNTlDOTMzNUQ0QzdDQjhEQzc0MDBEMDNBRUNGQiIsInNlcnZlciI6bnVsbCwicm9sZSI6IlJPTEVfQVJFQSxST0xFX1dJTkRPVyIsImlzSW5pdGlhbFBhc3N3b3JkIjoiMCIsInJlZ2lvbk5hbWUiOiLotLXlt57nnIEiLCJpbmR1c3RyeSI6bnVsbCwiYXBwQ29kZSI6ImRnb3YtcG9ydGFsIiwib3JnYW5OYW1lIjoi5paw6L-b5Lq65ZGYIiwicmVnaW9uQ29kZSI6IjUyMDAwMCIsImluZHVzdHJ5TGlzdCI6bnVsbCwib3JnYW5Db2RlIjoiNTIwMDAwMjAxNzAyMTYxMDA1MzAwMDA1MDciLCJleHBpcmF0aW9uVGltZSI6MiwiZ3JhZGUiOiIyIiwic3RhdHVzIjoiMSIsImlzcyI6Imluc3B1ciIsImlhdCI6MTczMjIzOTUzMCwiZXhwIjoxNzMyMjY4MzMwfQ.Dko517A_U61YWW_YkifM-sqaqfDb9U_hRS2-uekL5IQ7PqmqXUCS10MbDodoIrYN6f4vXdJe4-rtm4qrO8Xk7g; userInfoKey={^%^22role^%^22:^%^22ROLE_AREA^%^2CROLE_WINDOW^%^22^%^2C^%^22isInitialPassword^%^22:^%^220^%^22^%^2C^%^22regionName^%^22:^%^22^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^E7^%^9C^%^81^%^22^%^2C^%^22appCode^%^22:^%^22dgov-portal^%^22^%^2C^%^22organName^%^22:^%^22^%^E6^%^96^%^B0^%^E8^%^BF^%^9B^%^E4^%^BA^%^BA^%^E5^%^91^%^98^%^22^%^2C^%^22regionCode^%^22:^%^22520000^%^22^%^2C^%^22phone^%^22:^%^22384d53fa06a4844cfd54260b048c33e9^%^22^%^2C^%^22organCode^%^22:^%^2252000020170216100530000507^%^22^%^2C^%^22expirationTime^%^22:2^%^2C^%^22name^%^22:^%^221342b48e6f8f39ea7ba36accc05b61a8^%^22^%^2C^%^22id^%^22:^%^229E1059C9335D4C7CB8DC7400D03AECFB^%^22^%^2C^%^22email^%^22:^%^22aa67c9bf293c42e9144476195b550c0f^%^22^%^2C^%^22username^%^22:^%^2247d57692a252657367001b6a2ff35333^%^22^%^2C^%^22status^%^22:^%^221^%^22^%^2C^%^22isWeakPwd^%^22:^%^220^%^22}; pwdState=true; inspurRoleKey=ROLE_AREA; windowId=0B7CA12E92004E0ABCA9EB88F0A792E4; James_cookie_sYQDUGqqzHtheme=custom; lcToken=undefined; webfinal.session.errorCount=0; tempTokenKey-slsp=eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLnhormr4UiLCJhdWQiOiI5RTEwNTlDOTMzNUQ0QzdDQjhEQzc0MDBEMDNBRUNGQiIsInNlcnZlciI6bnVsbCwicm9sZSI6IkNKWVlfU1lTVEVNLENKWVlfQlVTSU5FU1MiLCJpc0luaXRpYWxQYXNzd29yZCI6IjAiLCJyZWdpb25OYW1lIjoi6LS15bee55yBIiwiaW5kdXN0cnkiOm51bGwsImFwcENvZGUiOiJER09WLVpXRlctU0xTUCIsIm9yZ2FuTmFtZSI6IuaWsOi_m-S6uuWRmCIsInJlZ2lvbkNvZGUiOiI1MjAwMDAiLCJpbmR1c3RyeUxpc3QiOm51bGwsIm9yZ2FuQ29kZSI6IjUyMDAwMDIwMTcwMjE2MTAwNTMwMDAwNTA3IiwiZXhwaXJhdGlvblRpbWUiOjIsImdyYWRlIjoiMiIsInN0YXR1cyI6IjEiLCJpc3MiOiJpbnNwdXIiLCJpYXQiOjE3MzIyNjA4NjUsImV4cCI6MTczMjI4OTY2NX0.HAeikwVlQje-V4uWtBPqJYjryGS4mxORUjzoLy07gkabcMzOUHPHctKIAb7Jq62YGGgwXUkargYDEpTYZjKMIQ; userInfoKey-slsp={^%^22role^%^22:^%^22CJYY_SYSTEM^%^2CCJYY_BUSINESS^%^22^%^2C^%^22isInitialPassword^%^22:^%^220^%^22^%^2C^%^22regionName^%^22:^%^22^%^E8^%^B4^%^B5^%^E5^%^B7^%^9E^%^E7^%^9C^%^81^%^22^%^2C^%^22appCode^%^22:^%^22DGOV-ZWFW-SLSP^%^22^%^2C^%^22organName^%^22:^%^22^%^E6^%^96^%^B0^%^E8^%^BF^%^9B^%^E4^%^BA^%^BA^%^E5^%^91^%^98^%^22^%^2C^%^22regionCode^%^22:^%^22520000^%^22^%^2C^%^22phone^%^22:^%^2218198171062^%^22^%^2C^%^22organCode^%^22:^%^2252000020170216100530000507^%^22^%^2C^%^22expirationTime^%^22:2^%^2C^%^22name^%^22:^%^22^%^E7^%^86^%^8A^%^E6^%^AF^%^85^%^22^%^2C^%^22id^%^22:^%^229E1059C9335D4C7CB8DC7400D03AECFB^%^22^%^2C^%^22email^%^22:^%^22afasfe^@qq.com^%^22^%^2C^%^22username^%^22:^%^22gys_xy^%^22^%^2C^%^22status^%^22:^%^221^%^22^%^2C^%^22windowId^%^22:^%^2211EF7D785488E5FCBAD4AF91FADA434E^%^22^%^2C^%^22windowName^%^22:^%^22^%^E9^%^81^%^B5^%^E4^%^B9^%^89^%^E5^%^B8^%^82^%^E4^%^B8^%^80^%^E4^%^BB^%^B6^%^E4^%^BA^%^8B^%^E7^%^AA^%^97^%^E5^%^8F^%^A3^%^22^%^2C^%^22windowCode^%^22:^%^22^%^E9^%^81^%^B5^%^E4^%^B9^%^89^%^E5^%^B8^%^82^%^E4^%^B8^%^80^%^E4^%^BB^%^B6^%^E4^%^BA^%^8B^%^E7^%^AA^%^97^%^E5^%^8F^%^A3^%^22^%^2C^%^22hallName^%^22:^%^22^%^E9^%^81^%^B5^%^E4^%^B9^%^89^%^E5^%^B8^%^82^%^E6^%^94^%^BF^%^E5^%^8A^%^A1^%^E6^%^9C^%^8D^%^E5^%^8A^%^A1^%^E4^%^B8^%^AD^%^E5^%^BF^%^83^%^22^%^2C^%^22hallCode^%^22:^%^2200001^%^22^%^2C^%^22windowRegionCode^%^22:^%^22520300^%^22}',
        'Priority': 'u=0',
    }

    data = {
        '_search': 'true',
        'nd': '1732266987369',
        'rows': '10',
        'page': '1',
        'sidx': '',
        'sord': '',
        'name': '',
        'code': itemcode,
        'org_code': '',
        'regionCode': '',
        'type': '',
        'policy_type': '',
        'is_online': '',
        'status': '',
    }

    response = requests.post('http://59.215.206.188/sxgl/mng/project/change/info/query', cookies=cookies, headers=headers, data=data).json()
    return response['records']
    print(response['records'])
